Phase modulator of two dynamic counters

ABSTRACT

A digital system controls the relative phase of the outputs of two dynamic counters by modulating the input train of pulses to one counter until the two counters are accurately in phase. In the system, successively releasable coarse, medium, and fine inphase detectors, operating at successively higher frequencies, are employed to permit modulation to occur until the desired inphase accuracy is obtained. The coarse in-phase detector first detects an in-phase condition causing release of the medium inphase detector, which next detects an in-phase condition causing release of the fine in-phase detector which provides the final in-phase detection that terminates the modulation. During the entire modulation period, a lead-lag detector controls the direction in which the input train of pulses to the one counter is modulated.

United States Patent [72] Inventor Amiel J. McCall 3,440,547 4/1969 Houcke 178/695 South Euclid, Ohio 3,454,926 8/ 1969 Kinzelman 340/168 5 3 32? 1969 Primary Examiner-Thomas A. Robinson patented y 18, 1971 Attorneys-Arnold T. Ericsen and Richard C. Stemmetz,Jr. [7 3] Assignee Allen-Bradley Company Milwaukee, Wis.

[ A system controls thfi relative Of COUNTERS the outputs of two dynamic counters by modulating the input train of pulses to one counter until the two counters are accu- 9 Claims, 6 Drawing Figs.

rately in phase. In the system, successively releasable coarse, US. medium and fine in phase detectors operating at successively 340/ 1683 l78/69-5R higher frequencies, are employed to permit modulation to [5 ccur until the desired in phase accuracy is obtained The Fleld of Search coarse in phase detector first detects an in phase condition (70); 340/170, 168, 146.1, 146.2; 178/695, 53.1; causing release of the medium in-phase detector, which next 328/63 133 detects an in-phase condition causing release of the fine inphase detector which provides the final in-phase detection [56] References Cited that terminates the modulation. During the entire modulation UNITED STATES PATENTS period, a lead-lag detector controls the direction in which the 2,980,858 4/1961 Grondin et a1 178/69.5 input train of pulses to the one counter is modulated.

15 11 SIGNAL fm f SOURCE MOD. I DC1 DC2 DC3 1 fc L I '14 13 l l c HOLD OFF 3 1 C1 2 HOL D OF F 183 18 W FINE 5 MEDlUM J COARSE IN-PHASE e iN-PHASE IN-PHASE I FDETECTOR 5 DETECTOR DETECTOR 16 (hr SIGNAL o SO U R C E Patented May 18, 1971 3,578,956

2 Sheets-Sheet 1 SIGNAL f SOURCE Dc1' DC2 DC3 C H T I I13 14 1 HOLD OFF 4/ 3 1 -c HOLD OFF 7 1s 17 w FINE 5 MEDIUM COARSE J lN-PHASE lN-PHASE iN-PHASE DETECTOR i if DETECTOR DETECTOR 16 v 531.

' f l l n SIGNAL SOURCE I DC1 DC2 DC3 25 Tm W 0 I m LJ L l I L] INVENTOR. AMIEL J. McCALL 3 Q BY iJ QjW ATTORNEYS Patented May 18, 1911 av 3,578,956

2 Sheets-Sheet 2 T 40 HOLD OFF f T v 42 IN-PHASE DETECTOR 1g 41 FIG. 4

1 2 3 f q llllllllllle llmllllllllllr llllllllll1111i lL l I C1 0 FF -"Q o n D1 Q o L 50 12 HOLD OFF 1 51 TO DETECTOR 18 52 "HOLD OFF FROM L T DETECTOR 16 MEDIUM lN-PHASE DETECTOR 1 7 f INVENTOR.

AMIEL J. McCALL FIG." 6 whw wi ATTORNEYS PHASE MODULATOR OF TWO DYNAMIC COUNTERS This invention relates to a system for controlling the relative phase of the outputs of two equal-length dynamic counters.

In digital systems, such as a numerically controlled machine tool, it is sometimes required to modulate the input to one counter until its output is accurately in phase with the output of a second counter. While there are various ways of providing such operation, it is highly desirable that the means employed for this purpose be simple, reliable and accurate.

Accordingly, an object of the present invention is to provide a simple and reliable system for controlling the modulation of the input to one of two digital counters for bringing its output into accurate phase with the output of the other counter.

Another object of the present invention is to provide improved logical circuit means for implementing the system of the foregoing object.

The above objects are accomplished in accordance with an exemplary embodiment of the invention by the use of a system employing a plurality of successively releasable in-phase detectors operating at successively higher frequencies which provide simple and reliable phase detection without ambiguity so as to permit modulation of the input of one of two equallength digital counters to occur until the outputs of the two counters are within the desired phase accuracy.

The novel features that are considered characteristic of this invention are set forth with particularity in the appended claims. The invention will be understood from the following description of an exemplary embodiment taken in connection with the accompanying drawings, in which:

FIG. 1 is a block diagram of a system embodying the present invention;

FIG. 2 is a logic diagram of a modulator for the system of FIG. 1;

FIG. 3 is a timing diagram illustrating the operation of the modulator of FIG. 2;

FIG. 4 is a logic diagram of a fine in-phase detector for the system of FIG. 1;

FIG. 5 is a timing diagram illustrating the operation of the fine in-phase detector of FIG. 4; and

FIG. 6 is a logic diagram of a logical circuit which may be employed for the medium and coarse in-phase detectors of the system of FIG. 1.

Like numerals refer to like elements throughout the FIGS. of the drawings.

Referring to FIG. 1, a source 10 which provides a pulse train signal at a frequency j], is employed to advance a pair of digital dynamic counters 11 and 12. Each is shown as typically comprising three decade counters DC 1, DC2, and DC3 connected in cascade. Each of the decade counters may be a binary counter of any number of binary stages. Obviously, other types of counters and/or stages may be used. The output of each decade counter is a signal at a frequency one-tenth the frequency of a signal at its input. Signals at intermediate frequencies may also be derived from each decade counter at internal points of its circuit in a conventional manner.

The source 10 is connected to the counter 11 through a modulator 13, which also receives a pulse train signal at a frequency f from a second source 14 via a NAND gate 15 which is enabled when modulation is required to bring the counter 11 into phase with the counter 12. It is to be noted that NAND logic is used in the illustrative logical implementations described herein, but obviously other types of logic could also be used. It is also to be noted that a NAND gate is also used to provide an inversion function where required. This may be accomplished in a conventional manner, such as by making all inputs true except the one which is to receive the signal to be inverted.

The modulator 13 operates to modulate the input to the counter 11, using pulses of frequency f,, from the second source 14 applied via the NAND gate 15, until a fine phase detector 18 detects that an in-phase condition of the desired accuracy has been achieved between the two counters l1 and 12. The output 18a from the fine phase detector 18 then becomes false to disable the NAND gate 15 and thereby terminate the modulation. The modulator 13 operates to either advance or retard the phase of the counter l 1 in response to a signal S on an output 49a of a sign circuit 49 which indicates the sign of the phase difference between the counters l1 and 12. For example, it will be assumed that signal S is true when the phase of the output of the counter 12 leads the output of the counter 11 and false when lagging.

FIG. 2 illustrates an exemplary modulator 13 capable of advancing or retarding the phase of the counter 11 of FIG. ll. It is to be understood that the inputs fl, andtfzin FIG. 2 respectively correspond to the outputs of the signal source 10 and the NAND gate 15 in FIG. 1. Typical f and f,, pulse trains are shown in FIG. 3. NAND gates 20 and 21 operate jointly (NAND gate 21 operating as an inverter) to provide the AND function fi,-f, at the input of the first stage B in the decade counter DCl of the counter 11 (FIG. 1). Thus, the input to the first stage B of the decade counter DCl is a train of pulses corresponding to the signal f with one pulse deleted f or each pulse of the signal f, as illustrated by the typical f 'f pulse train shown in FIG. 3.

As is conventional, the first stage B produces an output pulse for every two pulses produced by the pulse train M; applied thereto from the NAND gate 21. Accordingly, a NAND gate 22 which receives the fl'T pulse train and the output from the first stage B, will pass only every other pulse of the 2, -f,,, pulse train.

Still referring to FIG. 2, it will be seen that a NAND gate 25 receives the output of the NAND gate 22 and also the output of a NAND gate 24 which in turn has the sign signal S applied thereto (from the sign circuit 49 in FIG. 1) and the}; pulse train applied thereto via a NAND inverter 23. The resulting output of the NAND gate 25 which forms the input of the next stage B of the counter DCl is thus representable in Boolean algebra form as follow It will be remembered that the signal S is true (i.e., a binary 1) when the phase of the output of the counter 12 leads that of the counter 11 and false (i.e., a binary 0) when lagging. The leading situation for which S is 1 will be considered first with reference to the left side of FIG. 3. The resulting input to B in accordance with the above equation is correspondingly shown by the left side of tl bottom graph in FIG. 3, from which it will be seen that the f,,. pulses have been interjected into the B pulse train (which is every other pulse of fi 'fz), thereby causing advancement of the phase of the counter 11.

The situation where the phase of the output of the counter 12 lags that of the counter 11 will next be considered. For this situation, the sign signals is 0, and the right side of FIG. 3 is applicable. It will be understood that the input to B of the counter 11 is now merely the B, output which will be the same as the input to B of the counter 12, except that a pulse will be omitted at each location corresponding to a pulse f,,,, thereby causing a retardation in the phase of the output of the counter 12.

Operation of the fine in-phase detector 18 will now be described with reference to FIG. 4. The Q output 18a of a delay memory flip-flop D is held in its true state (Q high) by a HOLD OFF signal from the medium in-phase detector 17 (FIG. 1) until that detector provides an in-phase detection. Until then, modulation by the modulator 13 (FIGS. 1 and 2) will continue, since NAND gate 15 in FIG. 1 will remain enabled; also, the in-phase detection logic network comprising a NAND gate 40 and a flip-flop FF (consisting of two crosscoupled NAND gates) will remain ineffective. When the HOLD OFF signal is removed in response to an in-phase detection by the medium in-phase detector 17 (FIG. 1), the flipflop FF of the fine in-phase detector 18 in FIG. 4 will then become settable in response to the Boolean function f C j. The signal C is derived directly from a higher frequency stage in the counter 11 than that employed for the medium in-phase detector 17, and the signal C; is derived from the complementary side of the stage in the counter 12 corresponding to C, in the counter 11.

It will be understood that the function of f,,C-, C will become true only when the signals C, and C are out of phase. Ther fore, as indicated by the timing diagram of FIG. 5 (where C leads C,). the flip-flop FF, is set by a pulse P, of the signal f via the NAND gate 40. Thereafter, the trailing edge of the signal C, resets the flip-flop FF, via two cascaded inverter NAND gates 41 and 42 which serve to provide an appropriate resetting delay as illustrated in FIG. 5. The inverted signal C, appearing at the output of the NAND gate 41 is differentiated by an RC network 43 to clock the delay memory flip-flop D,, which may typically be a bistable circuit having a single input and an output equal to the input after it is clocked. Thus, the trailing edge of each signal C, serves to transfer the state of the flip-flop FF, into the flip-flop D, before the flip-flop FF is reset.

It is to be noted that the function of the network 43 may be provided by appropriate design of the clock input of a delay memory flip-flop. It is shown here separately for clarity only. It is also to be noted that other types of flip-flops may be employed besides those indicated. The flip-flop FF, functions as a short term buffer memory for the in-phase indication provided by the NAND gate 40, while the flip-flop D, functions as a long term memory for continuous control from one in-phase test to another as those tests are performed by the NAND gate 40 once per cycle of the signal C,.

In the typical operation of FIG. 4, the flip-flop D, initially remains in the set state when the HOLD OFF signal is removed. Such a condition continues as long as an out-ofphase condition is detected by the NAND gate 40 and stored in the flip-flop FF,, since only setting signals will be transferred to the delay memory flip-flop D, in response to the trailing edge of C,. The timing diagram of FIG. illustrates how the phase difference between signals C, and C, is typically reduced by f, pulses occurring at P, and P as a result of the continuing set state of the memory delay flip-flop D, enabling NAND gate in FIG. 1 so as to permit modulation to occur. As also illustrated in FIG. 5, when the f,, pulse occurs at P the phase difference is sufficiently small so that the functionf C C; will not become true. The state of the flip-flop FF, will thus remain false, causing a false state to be transferred to the flipflop D,, thereby disabling the NAND gate 15 in FIG. 1 to terminate the modulating operation of the modulator 13. Although FIG. 5 illustrates operation for the situation where C leads C,, it will be understood that analogous operation occurs for the situation where C lags C,.

Next to be considered is the operation of the sign block 49 in FIG. 1 for detecting the sign of the phase difference between the outputs C, and C of the counters 11 and 12. It will be understood that operation may be conventional such that, if the signal C leads the signal C,,,, the phase difference may be considered to be positive. The circuit of block 49 then provides a true signal S to the modulator 13 (FIG. 2) to cause advancement of the phase of the signal C If the phase difference is negative, the circuit of block 49 then applies a false signal S to the modulator 13 to retard the phase of the signal C,. In its simplest form, the sign detecting circuit 49 may be implemented by two binary stages B and B controlling a memory delay flip-flop D Stages B and B respond to the respective signals C,,, and C to provide output signals C,,,/2 and C,,,/2 which are respectively applied to the logic and clock inputs D and C of the delay memory flip-flop D Consequently, the flip-flop D will be set or reset to provide the appropriate state for signals S depending upon whether the signal C, leads or lags the signal C,,,.

It is to be noted that the frequencies of the signals f,,, f,,,, and C, and C are appropriately chosen so that the in-phase detector 18 operates sufficiently faster than the counter 11 can be modulated so that, when an in-phase detection of the signals C, and C is indicated by the fine in-phase detector 18, modulation can be halted before the next modulating pulse can ocour. Also, the phase relationship between the pulse trains f and f are appropriately chosen so as to provide the operation illustrated in the graphs of FIGS. 3 and 5. For example, the signal f may be at a frequency of l MHZ., and the sampling frequency f,,, of the signals C, and C may be selected to be at 50 kHz. The modulating signal may then be at any convenient frequency less than 50 kHz., such as 40 kHz.

The medium in-phase detector 17 of FIG. 1 will now be described with reference to FIG. 6. It will be understood that, similar to the fine in-phase detector 18, complementary counter signals C and C; are employed for phase detection, except that signals C and C; have a sampling frequency f}, of, for example, 5 kHz., which is considerably lower than the sampling frequency 1",, of signals C, andc, which is typically 50 kHz. as mentioned previously.

The operation of the medium in-phase detector 17 of FIG. 6 is similar to that of the fine in-phase detector 18 of FIG. 4. More specifically, when the HOLD OFF signal from the coarse in-phase detector 16 in FIG. 1 is removed from the flipflop D of the medium in-phase detector 17 in FIG. 6 as a result of the detector 16 detecting an in-phase condition, the flip-flop D remains set as long as an out-of-phwe condition exists between signals C and C3 This out-of-phase condition is detected by NAND gate 50 and flip-flop D according to the function C,- C E the signal C, is also applied as a clock signal to the flip-flop D via NAND gates 51 a n d 52. When the phase difference between signals C and C is sufficiently reduced, the flip-flop D remains reset. Thus, when the signal C returns to a false or low level, the positive going step appearing at the output of the NAND gate 53 is differentiated by a network 54 to provide a clocking signal for the flip-flop D, so as to transfer thereto the reset state from the flip-flop D thereby removing the HOLD OFF signal from the fine inphase detector 18. The flip-flop D is preset after each transfer via a NAND gate 55. Also, the Q output of the flip-flop D is applied to NAND gate 51 to prevent clocking at unwanted times. A timing diagram for operation of the logic network of FIG. 6 is not shown, since it would be similar to the previously described timing diagram of FIG. 4, with the signals C,, C,,, C D -Q and D -Q in FIG. 6 acting in a similar manner to the respective signals f,,, C,, C FF,-Q and D -Q in FIG. 4.

The coarse in-phase detector 16 in FIG. 1 is constructed and arranged in a manner similar to the medium in-phase detector 17 of FIG. 6 described above, except that it does r t receive a HOLD OFF signal and employs signals C and C having a still lower sampling frequency such as 1 kHz. The coarse in-phase detector 16 also employs a signal C of a frequency of, for example, 10 kHz. The signal C is used as a triggering signal in the same manner as the signal f,, in the fine in-phase detector 18 of FIG. 4 and the signal C, in the medium in-phase detector 17 of FIG. 6. The detailed construction and arrangement of an appropriate embodiment of the coarse inphase detector 16 is thus readily evident and will not be further considered herein.

It will be understood that, although three successively releasable in-phase detectors have been illustrated in the exemplary embodiment disclosed herein, a greater or smaller number of detectors may be provided depending upon the particular application involved. The number of in-phase detectors to be provided and their characteristics are preferably chosen in accordance with the following equations:

The character n in the above equations denotes the in-phase detector stages such that n=1 corresponds to the highest resolution detector, n=2 the next highest resolution detector, and so on. The character f denotes the frequency of the triggering signals used in the in-phase detectors, these being f, in the fine in-phase detector 18, C in the medium in-phase detector l7, and C in the coarse in-phase detector 16. The character R in the above equations denotes the band (i.e., the number of pulses of the triggering signal) within which the respective in-phase detector indicates an inphase condition. The character 1,, denotes the total number of triggering pulses in a cycle of the respective sampling frequency f,,,. The characters f, and f are respectively the source pulse train frequency and the modulation pulse train frequency, as described previously.

Equations (1) and (2) above are based on the provision of a resolution for the fine in-phase detector 18 within a single pulse of the triggering pulse train f so as to permit termination of the modulation in response to an in-phase detection before the occurrence of the next modulator pulse. Equation (3) is based on the recognition that, in order to prevent overshoot, an in-phase detector should operate to provide at least one sampling before the triggering pulses used in the next higher frequency detector can be modulated one full cycle minus one pulse. Equation (4) requires that an in-phase detector operate so that modulation from just out-of-band, through in-band, and outof-band again cannot occur before at least one sample occurs, and so that an in-band condition will be within the allowable region for unambiguous operation of the previous detector.

The following example will illustrate the use of the above equations to determine f, and f,, for each detector based on selected values of R and assuming f and f are 1 MHz. and 40 kHz. respectively. The corresponding equations used in each calculation are indicated in parentheses on the right.

Fine ln-Phase Detector 18 Select fl,,=50 kHz. which is 40 kHz.

Also select R =l (2) Then Medium In-Phase Detector 17 50 kHz.

Select f.,2=5 kHz.

40 kHz. 5k Hz.

Select R 10 Then f =5 kHz.

f 50kHz. lmHZ. =f

1 mHz.

Select R =50 1 mHz.

R3 -10am) (4) Although the present invention has been described in connection with a particular illustrated embodiment, it is to be understood that many variations and modifications in construction and arrangement afpossible without departing from the Then f =1 kHz. =10 kHz.

scope of the present invention as defined by the appended claims.

I claim:

1. In combination:

first and second counters, each having an equal number of counting stages;

a pulse source coupled to said counters for applying a train of pulses thereto in parallel;

phase detection means for providing in succession a plurality of different resolutions of in-phase operation of said counters from a coarse to a fine resolution and for producing a first control signal indicating an out-of-phase condition until an in-phase operation is reached within said fine resolution;

lead'lag detection means for providing an indication of the relative phase of said second counter signal indicating the lead-lag condition of said second counter to said first counter; and modulation means response to said second control signal for modulating the pulses applied to said first counter from said pulse source to reduce the relative phase difference between said counters until said first control signal no longer indicates an out-of-phase condition. 2. The invention in accordance with claim 1, wherein the resolution capability of the finest resolution is within one pulse cycle period of pulses from said source.

3. The invention in accordance with claim 2, wherein said modulation means provides for modulation of the pulses applied to said first counter from said source by interjecting additional pulses in said pulse train in order to advance the phase of said first counter and interrupting pulses in said pulse train in order to retard the phase of said first counter.

4. The invention according to claim 1 wherein said phase detection means provides for each of said different resolutions of in-phase operation of said counters a means for comparing the phases of corresponding stages selected for a given resolution having equal output signal frequencies greater than corresponding stages selected for resolutions which are more coarse than said given resolution, and wherein said lead-lag detection means provides the relative phase of said second counter to said first counter based upon the relative phase of output signals from corresponding stages selected for the most coarse of said plurality of resolutions. 5. The invention according to claim 4 wherein said phase comparing means for a given resolution provides an out-ofphase indication until an out-of-phase indication is no longer present in a phase comparing means for a more coarse resolution, and said phase comparing means for the finest resolution produces said first control signal until both an out-of-phase indication is no longer present in the phase comparing means of the next finest resolution and an out-of-phase indication is no longer present in said comparing means for the finest resolution.

6. The invention according to claim 1 wherein said phase detection means provides for each of said plurality of different resolutions comparing the phase of a signal derived from a stage of said first counter with a signal derived from a corresponding stage of said second counter at a time determined by a synchronized signal at a higher frequency; and

wherein said lead-lag detection means provides the relative phase of said second counter with respect to said first counterbased upon the relative phases of output signals from corresponding stages selected for comparison in the most coarse of said plurality of resolutions.

7. The invention according to claim 6 wherein said phase comparing means for a given resolution is adapted to provide an out-of-phase indication until an out-of-phase indication is no longer present in a phase comparing means for a more coarse resolution, and said phase comparing means for the finest resolution produces said first control signal until both an out-of-phase indication is no longer present in the phase comparing means of the next finest resolution and an out-of-phase indication is no longer present in said comparing means for the finest resolution.

8. The invention according to claim 7 wherein said comparing means for the finest resolution comprises:

means for forming the logic function f -C,-C where f,

represents the train of pulses from said pulse source, C represents one of said signals being compared and C represents the binary complement of the other one of said signals being compared; bistable storage means; means responsive to said function f C -C at the end of each period of one of said signals being compared for setting and storage means when said function is true and for resetting said storage means when said function is false, thereby producing said first control signal while said storage means is set; and means for holding said storage means set until said comparing means for the next lower resolution is no longer indicating an out-of-phase condition. 9. The invention according to claim 8 wherein said comparing means for each resolution more coarse than the finest resolution comprises:

means for forming the logic function f,,'C,,, C;,, where f, represents a signal at a higher frequency than signals being compared of corresponding stages of said first and second counter, C represents one of said signals being compared and C represents the binary complement of the other one of said signals being compared;

bistable storage means; and

means responsive to said function f -C fi at the end of each period of one of said signals being compared for setting said storage means when said function is true and resetting said storage means when said function is false, thereby indicating an out-of-phase condition;

and wherein said comparing means for each resolution more coarse than the finest resolution, except the most coarse resolution, includes means for holding said storage means thereof set until said comparing means for the next lower resolution is no longer indicating an out-of-phase condition.

mg UNITED STATES PATENT OFFICE CERTIFICATE OF CORRECTION Dated May 18, 1971 Patent No. 3 r r Inventor) Amiel J. McCall It is certified that error appears in the above-identified patent and that said Letters Patent are hereby corrected as shown below:

Column 2, Line 34 Line 16 After "counter" insert to said first counter and for producing a second control "5 should be f Column 6,

Signed and sealed this 19th day of October I 971 (SEAL) Attest:

EDWARD M.FLE"'CHER,JR. ROBERT GOTTSCHALK Acting Commissioner of Patents Attesting Officer 

1. In combination: first and second counters, each having an equal number of counting stages; a pulse source coupled to said counters for applying a train of pulses thereto in parallel; phase detection means for providing in succession a plurality of different resolutions of in-phase operation of said counters from a coarse to a fine resolution and for producing a first control signal indicating an out-of-phase condition until an in-phase operation is reached within said fine resolution; lead-lag detection means for providing an indication of the relative phase of said second counter signal indicating the lead-lag condition of said second counter to said first counter; and modulation means response to said second control signal for modulating the pulses applied to said first counter from said pulse source to reduce the relative phase difference between said counters until said first control signal no longer indicates an out-of-phase condition.
 2. The invention in accordance with claim 1, wherein the resolution capability of the finest resolution is within one pulse cycle period of pulses from said source.
 3. The invention in accordance with claim 2, wherein said modulation means provides for modulation of the pulses applied to said first counter from said source by interjecting additional pulses in said pulse train in order to advance the phase of said first counter and interrupting pulses in said pulse train in order to retard the phase of said first counter.
 4. The invention according to claim 1 wherein said phase detection means provides for each of said different resolutions of in-phase operation of said counters a means for comparing the phases of corresponding stages selected for a given resolution having equal output signal frequencies greater than corresponding stages selected for resOlutions which are more coarse than said given resolution, and wherein said lead-lag detection means provides the relative phase of said second counter to said first counter based upon the relative phase of output signals from corresponding stages selected for the most coarse of said plurality of resolutions.
 5. The invention according to claim 4 wherein said phase comparing means for a given resolution provides an out-of-phase indication until an out-of-phase indication is no longer present in a phase comparing means for a more coarse resolution, and said phase comparing means for the finest resolution produces said first control signal until both an out-of-phase indication is no longer present in the phase comparing means of the next finest resolution and an out-of-phase indication is no longer present in said comparing means for the finest resolution.
 6. The invention according to claim 1 wherein said phase detection means provides for each of said plurality of different resolutions comparing the phase of a signal derived from a stage of said first counter with a signal derived from a corresponding stage of said second counter at a time determined by a synchronized signal at a higher frequency; and wherein said lead-lag detection means provides the relative phase of said second counter with respect to said first counter based upon the relative phases of output signals from corresponding stages selected for comparison in the most coarse of said plurality of resolutions.
 7. The invention according to claim 6 wherein said phase comparing means for a given resolution is adapted to provide an out-of-phase indication until an out-of-phase indication is no longer present in a phase comparing means for a more coarse resolution, and said phase comparing means for the finest resolution produces said first control signal until both an out-of-phase indication is no longer present in the phase comparing means of the next finest resolution and an out-of-phase indication is no longer present in said comparing means for the finest resolution.
 8. The invention according to claim 7 wherein said comparing means for the finest resolution comprises: means for forming the logic function f0.C1.C2, where fo represents the train of pulses from said pulse source, C1 represents one of said signals being compared and C2 represents the binary complement of the other one of said signals being compared; bistable storage means; means responsive to said function f0.C1.C2 at the end of each period of one of said signals being compared for setting and storage means when said function is true and for resetting said storage means when said function is false, thereby producing said first control signal while said storage means is set; and means for holding said storage means set until said comparing means for the next lower resolution is no longer indicating an out-of-phase condition.
 9. The invention according to claim 8 wherein said comparing means for each resolution more coarse than the finest resolution comprises: means for forming the logic function fn.Cln.C2n where fn represents a signal at a higher frequency than signals being compared of corresponding stages of said first and second counter, C1n represents one of said signals being compared and C2n represents the binary complement of the other one of said signals being compared; bistable storage means; and means responsive to said function fn.Cln.C2n at the end of each period of one of said signals being compared for setting said storage means when said function is true and resetting said storage means when said function is false, thereby indicating an out-of-phase condition; and wherein said comparing means for each resolution more coarse than the finest resolutioN, except the most coarse resolution, includes means for holding said storage means thereof set until said comparing means for the next lower resolution is no longer indicating an out-of-phase condition. 